//
//  MiaoSha_Header_CCell.swift
//  MikerShop
//
//  Created by eme on 2017/2/20.
//  Copyright © 2017年 eme. All rights reserved.
//

/*
 owner:cy
 update:2017年02月20日11:12:16
 info: 秒杀 筛选cell
 VC :  HomePageVc
 */
import UIKit
import RxSwift
import SwiftDate
import RickonCore

class MiaoSha_Header_CCell: UICollectionViewCell {
    
    @IBOutlet weak var time_Lb: UILabel!
    
    @IBOutlet weak var description_Lb: UILabel!
    
    @IBOutlet weak var bg_V: UIView!
    var item:MiaoShaModel? {
        didSet{
            if let item  = self.item {
                self.time_Lb.text = item.time
                self.description_Lb.text = item.descriptionValue
                if let servertime = item.serverTime {
                    self.time_Lb.text = servertime.string(format:.custom("HH:mm"))
                }
            }
            
        }
        
    }
    func updateState(isSelected:Bool)  {
        if isSelected {
            self.bg_V.backgroundColor = Theme.btn.normal
            self.time_Lb.textColor = UIColor.white
            self.description_Lb.textColor = UIColor.white
        }else{
            self.bg_V.backgroundColor = UIColor(hex: "f4f4f4")
            self.time_Lb.textColor = UIColor(hex: "4d4d4d")
            self.description_Lb.textColor = UIColor(hex: "4d4d4d")
        }
    }
    
    override func awakeFromNib() {

    }
    
}
